#coding=utf-8
import datetime,subprocess

n = 10
def generate_passwd(t=None):
  if not t:
    t = datetime.datetime.today()
    t = int( str(t.month) + str(t.day))
  return str(t/3) + str(t%5) 

passwd = generate_passwd()	
passwd_file = '/home/jay/proxy/auth-password'
for i in range(1, n+1):
  subprocess.call(['htpasswd', '-b', '%s'%passwd_file, 'guest%i'%i, passwd])

  
